﻿using System.Configuration;

namespace SaJiraSync.Config.DownloadStatisticsWarning
{
    public sealed class DownloadStatisticsWarningSection : ConfigurationSection
    {
        [ConfigurationProperty("enabled", IsRequired = true)]
        public bool Enabled
        {
            get
            {
                return (bool)this["enabled"];
            }
        }

        /// <summary>
        /// If this value is exceeded, a warning is logged.
        /// </summary>
        [ConfigurationProperty("maxtolerableseconds", IsRequired = true)]
        public int MaxTolerableSeconds
        {
            get
            {
                return int.Parse(this["maxtolerableseconds"].ToString());
            }
        }
    }
}